package cn.yuxiaoyuan.system.mapper;

import cn.yuxiaoyuan.base.mapper.BaseMapper;
import cn.yuxiaoyuan.system.domain.Employee;
import cn.yuxiaoyuan.system.domain.Role;
import cn.yuxiaoyuan.system.query.EmployeeQuery;
import cn.yuxiaoyuan.system.query.RoleQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    List<Role> queryPage(RoleQuery roleQuery);

    Role findRoleByRole(Role role);

    void savePermissions(@Param("id") Long id,@Param("permissions") List<Long> permissions);

    void saveMenus(@Param("id")Long id, @Param("menus")List<Long> menus);

    void deletePreByRoleId(Long id);

    void deleteMenuByRoleId(Long id);

    List<Long> selectMenusIdByRoleId(Long id);

    List<Long> selectPerIdByRoleId(Long id);
}
